<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>search</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="css/main.css" />
		<link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" />
				<style type="text/css">
			<!--
			body,td{
				font-size: 14px;
			}
			#page{
				position:relative;
				height: 22px;
			}
			#page div{
				position: absolute;
				right: 0;
			}
			
			#page a {
				border: 1px solid #D0D0D0;
				padding: 0 4px 0 4px;
				color: #444444;
				text-decoration: none;
				font-size: 13px;
				display: block;
				text-align: center;
				float: left;
				margin-right: 5px;
				background-color: #FAFAFA;
				font-family: Arial, Helvetica, sans-serif;
				line-height: 18px;
			}
			
			#page a:hover {
				border: 1px solid #A6CAF0;
				color: #7FBFFF;
				background-color: #FFFFFF;
			}
			
			#ellipsis {
				border: 1px solid #FFFFFF;
				padding: 0 4px 0 4px;
				color: #444444;
				text-decoration: none;
				font-size: 13px;
				font-weight: bold;
				display: block;
				text-align: center;
				float: left;
				background-color: #FFFFFF;
				line-height: 18px;
				margin-right: 5px;
				font-family: Arial, Helvetica, sans-serif;
			}
			
			#current {
				border: 1px solid #D0D0D0;
				padding: 0 4px 0 4px;
				color: #FFFFFF;
				text-decoration: none;
				font-size: 13px;
				font-weight: bold;
				display: block;
				text-align: center;
				float: left;
				background-color: #6F6F6F;
				line-height: 18px;
				margin-right: 5px;
				font-family: Arial, Helvetica, sans-serif;
			}
			-->
		</style>
		<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
		<script type="text/javascript" src="js/jquery.autocomplete.js"></script>
		
		<script type="text/javascript">
			$(document).ready(function() {
				$("#keyword").autocomplete('autocomplete', {
					matchSubset: false,
					cacheLength: 1,
					scroll: false,
					delay: 200,
					dataType: "json",
					parse: function(data) {
		                var array = new Array();
	                	for(var i=0;i<data.autocomplete.length;i++){
	                		array[array.length] = { data: data.autocomplete[i], value: data.autocomplete[i], result: data.autocomplete[i]};
	                	}
		                return array;
			        },
					formatItem : function(data, i, total) { 
						return data; 
					}
				}).result(function(e, item) {
					//$("#prompt").append("<p>selected " + item + "</p>");
				});
				
				$("#search").click(function(){
					$("#form").submit();
				});
			});
		</script>
	</head>

	<body style="font-size: 12px;">
		<div id="center">
			<table width="800px;" style="padding-top: 80px">
				<thead>
					<tr>
						<th colspan="3">
							<img alt="google" src="logo_cn.png" ><br>
							<input id="keyword" name="q" type="text" size="20">
							<input id="search" type="submit" style="height: 30px;width :90px;vertical-align:middle;" value="Google搜索">
						</th>
					</tr>
				</thead>
			
			</table>
		</div>
	</body>
</html>
